home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Development Tools & Languages / Dylan Related / J-Dylan info / DIRMJ - Common Ground / Chap.8-15 (.txt) < prev    next >
Encoding:
Common Ground  |  1994-12-13  |  560.9 KB  |  2,973 lines  |  [CGDC/CGVM]

  1.     Chap.8-15
  2. CGDCCGVM
  3. wqCGDC
  4. Palatino
  5. (Controlling Dynamism)
  6.  Dylan
  7. Courier
  8. abstract
  9.     concrete)
  10. primary)
  11. free)
  12. seal generic
  13. define sealed method
  14. sealed slot
  15. seal generic
  16. adjectives
  17. &(Declaring characteristics of classes)
  18. sealed
  19. primary
  20.     abstract 
  21. concrete
  22. adjectives)
  23. sealed
  24.  sealed
  25. library
  26. <class>
  27. <class>
  28. primary
  29. free)
  30. instance allocated)
  31. Palatino
  32. ((Declaring sealing of generic functions)
  33. Courier
  34. sealed
  35. library
  36. add-method
  37. remove-method
  38. <generic-function>
  39. seal generic
  40. (The seal generic form)
  41. seal generic
  42. seal generic 
  43. function
  44. , ...
  45. function
  46. types
  47. <type>
  48. types 
  49. )0    function 
  50. seal generic
  51. not an 
  52. explicitly known method)
  53.     (disjoint
  54. disjoint
  55. (Defining New Classes)
  56. (Slot Uniqueness)
  57. Palatino
  58. i, j, k 
  59. Courier
  60. seal generic
  61. disjoint
  62. seal generic
  63. Abbreviations for seal generic)
  64. define sealed method
  65. define sealed method
  66. seal 
  67. generic
  68. define class
  69. sealed
  70. <object>
  71. define class
  72. sealed
  73. seal generic
  74. Palatino
  75. (Collections)
  76. Dylan
  77.     protocol)
  78.     Helvetica
  79. <collection>
  80. ABSTRACT
  81. INSTANTIABLE
  82. SEALED
  83. COLLECTION CLASSES
  84. <mutable-collection>
  85. !<mutable-explicit-key-collection>
  86. <sequence>
  87. <explicit-key-collection>
  88. <mutable-sequence>
  89. <array>
  90. <table>
  91. <vector>
  92. <string>
  93. <deque>
  94. <range>
  95. <stretchy-vector>
  96. <simple-object-vector>
  97. <unicode-string>
  98. <byte-string>
  99. <list>
  100. <empty-list>
  101. <pair>
  102. <stretchy-collection>
  103. (Functions for Collections)
  104. Dylan
  105. Courier
  106. collection
  107. Symbol
  108.     {integer 
  109. [Generic Function]
  110. collection
  111.  Dylan
  112. Palatino
  113. iterating through)
  114. Courier
  115. class-for-copy
  116.    mutable-collection
  117. Symbol
  118. class
  119. [G.F. Method]
  120. class-for-copy
  121. mutable)
  122. class-for-
  123. <object>
  124. class-for-
  125. <mutable-sequence>
  126. explicit-key-collection
  127. class
  128. )#    -for-copy
  129. )$    <mutable-
  130. explicit-key-collection>
  131. empty?
  132.    collection  
  133.       boolean
  134. [Generic Function]
  135. collection
  136.    procedure collection 
  137. #rest
  138.  more-collections 
  139. [Function]
  140.   false
  141.     procedure
  142. collections
  143. % do (method (a, b) print (a + b) end,
  144.       #(100, 100, 200, 200),
  145.       #(1, 2, 3, 4))
  146. procedure collection 
  147. #rest
  148.  more-collections
  149. [Function]
  150.   new-collection
  151. collection
  152.     procedure
  153. collection
  154. class-for-copy
  155. collections 
  156. size: 
  157.      map (\+,
  158.        #(100, 100, 200, 200),
  159.        #(1, 2, 3, 4))
  160. #(101, 102, 203, 204)
  161. Courier
  162. map-as
  163. Palatino
  164. class procedure collection 
  165. #rest
  166.  more-collections
  167. [Function]
  168. Symbol
  169.   new-collection
  170. map-as
  171. collection
  172.     procedure
  173. class
  174. class
  175.     <mutable-
  176. collection>
  177. size:
  178. collections
  179. size:
  180.  map-as (<vector>, \+,
  181. 0           #(100, 100, 200, 200),
  182.           #(1, 2, 3, 4))
  183. #(101, 102, 203, 204)
  184. map-into
  185. mutable-collection procedure
  186. [Function]
  187. collection 
  188. #rest
  189.  more-collections
  190.  mutable-collection
  191. map-into
  192. mutable-collection
  193. collection
  194. more-collections
  195. )c    procedure
  196. mutable-collection
  197. mutable-collection
  198. <stretchy-collection>
  199. (alignment requirement
  200. mutable-collection
  201. D    procedure
  202. )`    procedure
  203. mutable-collection
  204. element-setter
  205. mutable-collection
  206. mutable-collection 
  207. map-into
  208. <stretchy-
  209. collection>
  210. key-test
  211. mutable-collection
  212. collection
  213. more-collections
  214. . define variable x = list (100, 100, 200, 200)
  215.   map-into (x, \+, #(1, 2, 3, 4))
  216. #(101, 102, 203, 204)
  217. #(101, 102, 203, 204)
  218.    procedure collection 
  219. #rest
  220.  more-collections 
  221. [Function]
  222.   value
  223. collection
  224. more-collections
  225.     procedure
  226. Courier
  227. Palatino
  228.     procedure
  229. procedur
  230.     procedure
  231. ( any? (\>, #(1, 2, 3 ,4), #(5, 4, 3, 2))
  232.  any? (even?, #(1, 3, 5, 7))
  233. every?
  234.    procedure collection 
  235. #rest
  236.  more-collections 
  237. [Function]
  238. Symbol
  239.       boolean
  240. every?
  241. every? 
  242.     procedure
  243. * every? (\>, #(1, 2, 3, 4), #(5, 4, 3, 2))
  244.  every? (odd?, #(1, 3, 5, 7))
  245. reduce
  246. )*&   procedure initial-value collection 
  247.   value
  248. [Generic Function]
  249.     procedure
  250. collection
  251. collection
  252. reduce
  253. initial-value
  254. )T    procedure
  255. initial-value
  256. collection 
  257. collection 
  258.     procedure
  259. collection
  260. collection 
  261. collection
  262.   define variable high-score = 10
  263. high-score
  264. . reduce (max, high-score, #(3, 1, 4, 1, 5, 9))
  265. / reduce (max, high-score, #(3, 12, 9, 8, 8, 6))
  266. reduce1
  267. procedure collection 
  268.   value
  269. [Generic Function]
  270. reduce1
  271. reduce
  272. collection
  273. collection
  274. reduce
  275. (unstable)
  276. collection
  277. collection
  278.  reduce1 (\+, #(1, 2, 3, 4, 5))
  279. member?
  280. value collection 
  281.  test 
  282.       boolean
  283. [Generic Function]
  284. Courier
  285. member?
  286. Palatino
  287. collection 
  288. value
  289. value
  290. collection
  291. A define constant flavors = #(#"vanilla", #"pistachio", #"ginger")
  292. flavors
  293.  member? (#"vanilla", flavors)
  294.  member? (#"banana", flavors)
  295. find-key
  296. collection procedure 
  297.  skip failure 
  298. Symbol
  299.   key
  300. [Generic Function]
  301. )<    procedure
  302.     (element(
  303. collection 
  304.     procedure
  305. failure
  306. element
  307. collection
  308. )0    procedure
  309. skip 
  310. failure
  311.  flavors
  312. 0&#(#"vanilla", #"pistachio", #"ginger")
  313.  find-key (flavors, has-nuts?)
  314.  flavors[1]
  315. #"pistachio"
  316. replace-elements!
  317.    mutable-collection pred
  318. icate 
  319. [Generic Function]
  320. new-value-fn 
  321.  count
  322. mutable-collection
  323. )<    predicate
  324. mutable-collection
  325. value-fn
  326. count
  327. count
  328. 0 define variable numbers = list (10, 13, 16, 19)
  329. numbers
  330. * replace-elements! (numbers, odd?, double)
  331. #(10, 26, 16, 38)
  332. fill!
  333. mutable-collection value 
  334.  start end
  335. [Generic Function]
  336. fill!
  337. mutable-collection
  338.  element
  339. mutable-
  340. collection ,key
  341. value
  342. mutable-collection
  343. Palatino
  344. (mutable sequence)
  345. start
  346. start
  347. Courier
  348. 0 define variable numbers = list (10, 13, 16, 19)
  349. numbers
  350.  fill! (numbers, 3, start: 2)
  351. #(10, 13, 3, 3)
  352. key-test
  353. collecti
  354. test-function
  355. [Generic Function]
  356. iteration protocol )
  357. element
  358. key-test
  359. element
  360. (Functions for Sequences)
  361. Dylan
  362. add-new
  363. remove
  364. choose
  365.     choose-by
  366. intersection
  367. union
  368. remove-
  369. duplicates
  370. copy-sequence
  371. concatenate
  372. reverse
  373. primary)
  374. class-
  375. for-copy
  376. range
  377. ass-for-copy
  378. <list>
  379. copy-sequence
  380. size-setter
  381. n stretchy-sequence  
  382. Symbol
  383. [Generic Function]
  384. stretchy-sequence 
  385. size)
  386. stretchy-sequence 
  387. stretchy-sequence 
  388. stretchy-sequence 
  389. stretchy-sequence 
  390. stretchy-sequence 
  391. size:
  392. fill:
  393. stretchy-sequence 
  394. size-setter
  395. stretchy-sequence 
  396. Dylan
  397. Courier
  398. Palatino
  399. sequence
  400. new-element 
  401. Symbol
  402.   new-sequence
  403. [Generic Function]
  404. new-element
  405. sequence
  406. sequence
  407. sequence
  408. sequence
  409. % define variable numbers = #(3, 4, 5)
  410. numbers
  411.  add (numbers, 1)
  412. #(1, 3, 4, 5)
  413.  numbers
  414. #(3, 4, 5)
  415. )        sequence1
  416. new-element 
  417.   sequence2
  418. [Generic Function]
  419. new-element
  420. )<    sequence1
  421.     sequence1
  422. ,    sequence2
  423.     sequence1
  424.     sequence1
  425.     sequence2
  426.     sequence1
  427. ) define variable numbers = list (3, 4, 5)
  428. numbers
  429.  add! (numbers, 1)
  430. #(1, 3, 4, 5)
  431. add-new
  432. sequence
  433. new-element 
  434.  test 
  435.   new-sequence
  436. [Generic Function]
  437. new-element
  438. sequence
  439. add-new
  440. new-element
  441. sequence
  442. sequence
  443. sequence
  444. sequence
  445. new-element
  446.  add-new (#(3, 4, 5), 1)
  447. #(1, 3, 4, 5)
  448.  add-new (#(3, 4, 5), 4)
  449. #(3, 4, 5)
  450. add-new!
  451. sequence
  452. new-element 
  453.  test 
  454.  new-sequence
  455. [Generic Function]
  456. new-element
  457. sequence
  458. add-new!
  459. new-element
  460. sequence
  461. sequence
  462. sequence
  463. sequence
  464. new-element
  465.  add-new! (list (3, 4, 5), 1)
  466. Courier
  467. #(1, 3, 4, 5)
  468.  add-new! (list (3, 4, 5), 4)
  469. #(3, 4, 5)
  470. remove
  471. Palatino
  472. ence value 
  473.  test count
  474. Symbol
  475.   new-sequence
  476. [Generic Function]
  477. remove
  478. sequence
  479. value
  480. value
  481. count
  482. value
  483. count
  484. value
  485. sequence
  486. sequence
  487. sequence
  488. value
  489.   remove (#(3, 1, 4, 1, 5, 9), 1)
  490. #(3, 4, 5, 9)
  491. remove!
  492. sequence value 
  493.  test count
  494.   new-sequence 
  495. [Generic Function]
  496. remove!
  497. sequence
  498. value
  499. value
  500. count
  501. value
  502. count
  503. value
  504. sequence
  505. sequence
  506. sequence
  507. value
  508. % remove! (list (3, 1, 4, 1, 5, 9), 1)
  509. #(3, 4, 5, 9)
  510. choose
  511.  predicate sequence  
  512. new-sequence
  513. [Generic Function]
  514. choose
  515. sequence
  516. )0    predicate
  517. $ choose (even?, #(3, 1, 4, 1, 5, 9))
  518.     choose-by
  519. )?+   predicate test-sequence value-sequence  
  520. [Generic Function]
  521.  new-sequence
  522.     choose-by
  523. value-sequence
  524. test-sequence
  525. )`    predicate
  526. # choose-by (even?, range (from: 1),
  527. 0<             #("a", "b", "c", "d", "e", "f", "g", "h", "i"))
  528. #("b", "d", "f", "h")
  529. intersection
  530.    sequence1 sequence2 
  531.  test  
  532. [Generic Function]
  533. new-sequence
  534. Courier
  535. intersection
  536. Palatino
  537.     sequence1
  538. )0    sequence2
  539. )H    sequence2
  540. )$    sequence1
  541.     sequence2
  542. 4 intersection (#("john", "paul", "george", "ringo"),
  543. 0<                #("richard", "george", "edward", "charles"),
  544.                 test: \=)
  545. #("george")
  546. union
  547.    sequence1 sequence2 
  548.  test  
  549. Symbol
  550. new-sequence
  551. [Generic Function]
  552. union
  553.     sequence1
  554.     sequence2
  555.     sequence1
  556. )`    sequence2
  557. 6 union (#("butter", "flour", "sugar", "salt", "eggs"),
  558. 0<         #("eggs", "butter", "mushrooms", "onions", "salt"),
  559.          test: \=)
  560. D#("salt", "butter", "flour", "sugar", "eggs", "mushrooms", "onions")
  561. remove-duplicates
  562.     sequence 
  563.  test  
  564. new-sequence
  565. [Generic Function]
  566. sequence
  567. sequence
  568. sequence
  569. sequence
  570. . remove-duplicates (#("spam", "eggs", "spam", 
  571. 02                       "sausage", "spam", "spam"),
  572.                       test: \=)
  573. #("spam", "eggs", "sausage")
  574. remove-duplicates!
  575.     sequence 
  576.  test  
  577. new-sequence
  578. [Generic Function]
  579. sequence
  580. sequence
  581. sequence
  582. sequence
  583. sequence
  584. / remove-duplicates! (#("spam", "eggs", "spam", 
  585. Courier
  586. 2                       "sausage", "spam", "spam"),
  587.                       test: \=)
  588. #("spam", "eggs", "sausage")
  589. copy-sequence
  590. Palatino
  591.    source 
  592.  start end  
  593. Symbol
  594. new-se
  595. quence 
  596. [Generic Function]
  597. copy-sequence
  598. source
  599. start
  600. source
  601. @ define constant hamlet = #("to", "be", "or", "not", "to", "be")
  602. hamlet
  603. ! hamlet == copy-sequence (hamlet)
  604. ) copy-sequence (hamlet, start: 2, end: 4)
  605. #("or", "not")
  606. concatenate-as
  607.    class sequence1 
  608. #rest
  609.  more-sequences  
  610. [Function]
  611. new-sequence
  612. concatenate-as
  613. class
  614. class
  615. <mutable-sequence>
  616. size:
  617. size:
  618. > concatenate-as (<string>, #('n', 'o', 'n'), #('f', 'a', 't'))
  619. "nonfat"
  620. concatenate
  621.    sequence1 
  622. #rest
  623.  sequences  
  624. new-sequence
  625.     Function]
  626. concatenate
  627. sequence
  628. concatenate
  629. class-for-
  630. class-for-copy
  631. <mutable-collection>
  632. size:
  633. size:
  634.   concatenate ("low-", "calorie")
  635. "low-calorie"
  636. replace-subsequence! 
  637. sequence insert-sequence
  638.  #key 
  639. )!    start end
  640. [Generic Function]
  641. result-sequence
  642. insert-sequence
  643. )T    sequence 
  644. start
  645. start
  646. Courier
  647. Palatino
  648. sequence
  649. result-sequence
  650. sequence
  651. sequence
  652. sequence
  653. result-sequence 
  654. insert-sequence
  655. result-sequence
  656. 04? define variable x = list ("a", "b", "c", "d", "e")
  657. 0=? abcde := replace-subsequence! (x, #("x", "y", "z"), end: 1)
  658. $#("x", "y", "z", "b", "c", "d", "e")
  659. ?? abcde := replace-subsequence! (x, #("x", "y", "z"), start: 4)
  660. $#("x", "y", "z", "b", "x", "y", "z")
  661. 6? abcde := replace-subsequence! (x, #("a", "b", "c"), 
  662. 9                                        start: 2, end: 4)
  663. )#("x", "y", "a", "b", "c", "x", "y", "z")
  664. reverse
  665.    sequence  
  666. Symbol
  667. new-sequence
  668. [Generic Function]
  669. reverse
  670. sequence
  671. sequence
  672. , define constant x = #("bim", "bam", "boom")
  673.  reverse(x)
  674. #("boom", "bam", "bim")
  675. #("bim", "bam", "boom")
  676. reverse!
  677.    sequence1  
  678.     sequence2
  679. [Generic Function]
  680. reverse!
  681. sequence
  682. )<    sequence 
  683. sequence
  684.    sequence  
  685.  test stable  
  686. new-sequence
  687. [Generic Function]
  688. sort 
  689. sequence
  690. stable
  691. test(x, y)
  692. test(y, x)
  693. . define variable numbers = #(3, 1, 4, 1, 5, 9)
  694. numbers
  695.  sort (numbers)
  696. #(1, 1, 3, 4, 5, 9)
  697.  numbers
  698. #(3, 1, 4, 1, 5, 9)
  699. Courier
  700. sort!
  701. Palatino
  702.    sequence1 
  703.  test stable  
  704. Symbol
  705.     sequence2
  706. [Generic Function]
  707. sequence
  708. sequence
  709. first
  710.    sequence  
  711.      default 
  712. value
  713. [Function]
  714. second
  715.    sequence  
  716.      default 
  717. value
  718. [Function]
  719. third
  720.    sequence  
  721.      default 
  722. value
  723. [Function]
  724. sequence
  725. index)
  726. element
  727. element
  728. zero-based)
  729. first(seq)
  730. element(seq, 0)
  731. seq[0]
  732. element
  733. first-setter
  734.    new-value  sequence 
  735.     new-value
  736. [Function]
  737. second-setter
  738.    new-value  sequence 
  739. )        new-value
  740. [Function]
  741. third-setter
  742.    new-value  sequence 
  743.     new-value
  744. [Function]
  745. sequence
  746. element-setter
  747. )0    new-value
  748. element
  749. first-setter(val, seq)
  750. element-
  751. setter (val, seq, 0)
  752. seq[0] := val
  753.    sequence  
  754.      default 
  755. value
  756. [Generic Function]
  757. sequence
  758. default
  759. default
  760. # last (#("emperor", "of", "china"))
  761. "china"
  762. last-setter
  763.     new-value
  764. mutable-sequence 
  765.     new-value
  766. [Generic Function]
  767. mutable-sequence
  768. )T    new-value
  769. )T    new-value
  770. mutable-
  771. sequence
  772. mutable-
  773. sequence
  774. (define variable my-list = list (1, 2, 3)
  775. my-list
  776. #(1, 2, 3)
  777. last (my-list) := 4
  778. Courier
  779. my-list
  780. #(1, 2, 4)
  781. *define variable my-empty-vector = vector()
  782. my-empty-vector
  783. last (my-empty
  784. -vector) := 4
  785. subsequence-position
  786. Palatino
  787.    big pattern 
  788.  test count  
  789. Symbol
  790. index
  791. [Generic Function]
  792. pattern
  793. pattern 
  794. pattern
  795. count
  796. count
  797. 6 subsequence-position ("Ralph Waldo Emerson", "Waldo")
  798. sequence
  799. sequence
  800. boolean
  801. [G.F. Method]
  802. sequence
  803. sequence
  804. key-test
  805. sequence
  806.   => 
  807. test-function
  808. [G.F. Method]
  809. key-test
  810. %(The Instantiable Collection Classes)
  811. Dylan
  812. capabilities
  813. <array>
  814. [Abstract Instantiable Class]
  815. rank)
  816. row-major)
  817. Palatino
  818. sublinear)
  819. Courier
  820. <array>
  821. dimensions:
  822. fill:
  823. dimensions:
  824. fill: 
  825. <array>
  826. element
  827. element-setter
  828. <byte-string>
  829. [Sealed Instantiable Class]
  830. <vector>
  831. <string>
  832. <byte-string>
  833. size:
  834. fill:
  835. size:
  836. <byte-string>
  837. fill:
  838. <deque>
  839. [Instantiable Class]
  840. <mutable-sequence>
  841. <deque>
  842. size:
  843. fill:
  844. size:
  845. <deque>
  846. fill:
  847. <list>
  848. [Sealed Instantiable Class]
  849. <sequence>
  850. <list>
  851. size:
  852. fill:
  853. size:
  854. <list>
  855. fill:
  856. <empty-list>
  857. [Sealed Instantiable Class]
  858. <empty-list>
  859. <empty-list>
  860. <list>
  861. <empty-list>
  862. singleton(#())
  863. object-class (#())
  864. <empty-list>
  865. *define method f (x :: <empty-list>) 1 end;
  866. !define method f (x == #()) 2 end;
  867. $define method f (x :: <list>) 3 end;
  868. f (#())
  869. f (#("chocolate", "vanilla"))
  870. <range>
  871. [Instantiable Class]
  872. arithmetic sequences)
  873. <sequence>
  874. Palatino
  875. (ranges)
  876. Courier
  877. from:, to:, above:, 
  878. below:, by:,
  879. size:
  880. from:
  881. size:
  882. range:
  883. above:
  884. below:
  885. above:
  886. below:
  887. above:
  888. below:
  889. <simple-object-vector>
  890. [Sealed Instantiable Class]
  891. <vector>
  892. <simple-object-vector>
  893. size:
  894. fill:
  895. size:
  896. <simple-
  897. object-vector>
  898. fill:
  899. <stretchy-vector>
  900. [Abstract Instantiable Class]
  901. <vector>
  902. <stretchy-vector>
  903. size:
  904. fill:
  905. size:
  906. <stretchy-vector>
  907. fill:
  908. ring>
  909. [Abstract Instantiable Class]
  910. <sequence>
  911. <string>
  912. <string>
  913. <string>
  914. <string>
  915. <string>
  916. size:
  917. fill:
  918. size:
  919. <table>
  920. [Abstract Instantiable Class]
  921. hashtable)
  922.     unstable)
  923. <table>
  924. size:
  925. <table>
  926. table-protocol
  927. Iteration 
  928.     Protocol)
  929. <table>
  930. table-
  931. protocol
  932. (The Table Protocol)
  933. <table>
  934. <table>
  935. Courier
  936. <object-table>
  937. <object-table>
  938. Palatino
  939. [Sealed Instantiable Class]
  940. <table>
  941. <unicode-string>
  942. [Sealed Instantiable Class]
  943. <vector>
  944. <string>
  945. <unicode-string>
  946. size:
  947. fill:
  948. size:
  949. <unicode-string>
  950. fill:
  951. <vector>
  952. [Abstract Instantiable Class]
  953. <array>
  954. vectors)
  955. <vector>
  956. <vector>
  957. <simple-object-vector>
  958. <vector>
  959. <array>
  960. (Operations on Arrays)
  961. dimensions
  962. array
  963. Symbol
  964.   sequence
  965. [Function]
  966. array
  967. <array>
  968. % dimensions (make (<array>, dimension
  969. s: #(4, 4)))
  970. #(4, 4)
  971. array
  972. [G. F. Method]
  973. <array>
  974. reduce(\*, 1, dimensions(
  975. array
  976. row-major-index
  977. aref-setter
  978.     dimension
  979. array
  980. [Generic Function]
  981. array
  982. Courier
  983. Palatino
  984. array
  985. Symbol
  986. [G. F. Method]
  987. array
  988. dimensions
  989. <array>
  990. row-major-index
  991. array
  992. #rest
  993. subscripts
  994. index
  995. [Generic Function]
  996. subscripts
  997. row-major)
  998. array
  999. subscripts)
  1000. row-major-index
  1001. array
  1002. #rest
  1003. subscripts
  1004. index
  1005. [G. F. Method]
  1006. array
  1007. dimensions
  1008. <array>
  1009. array
  1010. #rest
  1011. indices
  1012. element
  1013. [Generic Function]
  1014. indices
  1015. array 
  1016. indices
  1017. indices
  1018. array
  1019. #rest
  1020. indices
  1021. element
  1022. [G. F. Method]
  1023. array 
  1024. indices
  1025. row-major-index
  1026. array
  1027. aref-setter
  1028.     new-value
  1029. array  
  1030. #rest
  1031. indices
  1032. new-value 
  1033. [Generic Function]
  1034. indices
  1035. array
  1036. new value)
  1037. indices
  1038. array
  1039. indices
  1040. array
  1041. array
  1042. aref-setter
  1043.     new-value
  1044. array 
  1045. #rest
  1046. indices
  1047. new-value 
  1048. [G. F. Method]
  1049. array 
  1050. indices
  1051. row-major-index
  1052. element-setter
  1053. <array>
  1054.     dimension
  1055. array axis
  1056. dimension 
  1057. [Generic Function]
  1058. array
  1059. array
  1060. array
  1061. Courier
  1062.     dimension
  1063. Palatino
  1064. array axis
  1065. Symbol
  1066. dimension 
  1067. [G. F. Method]
  1068. array
  1069. dimensions
  1070. element
  1071. <array>
  1072. dimensions
  1073.     dimension
  1074. Deques
  1075. (Operations on Deques)
  1076. deque new-value  
  1077. deque
  1078. [Generic Function]
  1079. )$    new-value
  1080. deque
  1081. deque  
  1082. first-element
  1083. [Generic Function]
  1084. deque
  1085.     push-last
  1086. deque new-value  
  1087. deque
  1088. [Generic Function]
  1089.     push-last
  1090.     new-value
  1091. deque 
  1092. pop-last
  1093. deque  
  1094. last-element
  1095. [Generic Function]
  1096. pop-last
  1097. deque
  1098.    deque new-value  
  1099. deque
  1100. [G.F. Method]
  1101. deque
  1102. deque
  1103. remove!
  1104.    deque value 
  1105.  test count   
  1106. deque
  1107. [G.F. Method]
  1108. deque 
  1109. remove!
  1110. deque
  1111. deque
  1112. (Operations on Lists)
  1113. <list>
  1114. <pair>
  1115. <empty-list>
  1116. <list>
  1117. <pair>
  1118. <empty-list>
  1119. <list>
  1120. (improper list)
  1121. <type-error>
  1122. Palatino
  1123. Courier
  1124.    head tail 
  1125. Symbol
  1126. [Function]
  1127. (head)
  1128. (tail)
  1129.  pair (1, 2)
  1130. #(1 . 2)
  1131.  pair (1, #(2, 3, 4, 5))
  1132. #(1, 2, 3, 4, 5)
  1133. #rest
  1134.  args 
  1135. [Function]
  1136.  list (1, 2, 3)
  1137. #(1, 2, 3)
  1138.  list (4 + 3, 4 - 3)
  1139. #(7, 1)
  1140. list  
  1141. object
  1142. [Function]
  1143.  head (#(4, 5, 6))
  1144.  head (#())
  1145.        list  
  1146. object
  1147. [Function]
  1148.  tail (#(4, 5, 6))
  1149. #(5, 6)
  1150.  tail (#())
  1151. head-setter
  1152.    object  pair 
  1153. object
  1154. [Function]
  1155. object
  1156. object
  1157. # define variable x = list (4, 5, 6)
  1158. #(4, 5, 6)
  1159.  head (x) := 9
  1160. #(9, 5, 6)
  1161. tail-setter
  1162.    object  pair 
  1163. object
  1164. [Function]
  1165. Palatino
  1166. object
  1167. object
  1168. Courier
  1169. # define variable x = list (4, 5, 6)
  1170. #(4, 5, 6)
  1171.  tail (x) := #(9, 8, 7)
  1172. #(9, 8, 7)
  1173. #(4, 9, 8, 7)
  1174.    list element 
  1175. Symbol
  1176. [G.F. Method]
  1177. element ,list
  1178. list 
  1179. remove!
  1180.    list element 
  1181.  test count
  1182. [G.F. Method]
  1183. remove!
  1184.   list
  1185.     {integer 
  1186. [G.F. Method]
  1187. boolean
  1188. [G.F. Method]
  1189. (final tails)
  1190. list  
  1191. sequence
  1192. boolean
  1193. [G.F. Method]
  1194. sequence  
  1195. boolean
  1196. [G.F. Method]
  1197. (dotted list)
  1198. (Operations on Ranges)
  1199. range
  1200. from to above below by size  
  1201. range
  1202. [Function]
  1203. (range)
  1204. above ,
  1205. below
  1206. above  
  1207. below  
  1208. above  
  1209. below  
  1210. <range>
  1211. member?
  1212.     val range
  1213. boolean
  1214. [G.F. Method]
  1215. Palatino
  1216. range
  1217. Courier
  1218. range 
  1219. Symbol
  1220. [G.F. Method]
  1221. copy-sequence
  1222. range 
  1223.  start end 
  1224.     new-range
  1225. [G.F. Method]
  1226. copy-sequence
  1227. class-for-copy
  1228. <list>
  1229. range1 
  1230. range2 
  1231. boolean
  1232. [G.F. Method]
  1233. reverse
  1234. )1       range 
  1235.     new-range
  1236. [G.F. Method]
  1237. reverse!
  1238. )8       range 
  1239. range
  1240. [G.F. Method]
  1241. reverse!
  1242. range
  1243. intersection
  1244.    range1 range2 
  1245. range
  1246. [G.F. Method]
  1247. intersection
  1248. class-for-copy
  1249. <range>
  1250. range1
  1251. range2
  1252.  (Operations on Stretchy Vectors)
  1253.     stretchy-vector new-element  
  1254. stretchy-vector
  1255. [G.F. Method]
  1256. new-element
  1257. stretchy-vector
  1258. stretchy-vector
  1259. stretchy-vector
  1260. remove!
  1261.    stretchy-vector element 
  1262.  test count  
  1263. stretchy-vector
  1264. [G.F. Method]
  1265. remove!
  1266. stretchy-vector
  1267. stretchy-vector
  1268. Palatino
  1269. (Operations on Strings)
  1270. Courier
  1271.     string1  
  1272. string2 
  1273. Symbol
  1274. boolean
  1275. [G.F. Method]
  1276. strict prefix)
  1277. as-lowercase
  1278.    string 
  1279. new-string
  1280. [G.F. Method]
  1281. map(as-lowercase,
  1282. string
  1283.  define variable x = "Van Gogh"
  1284.  as-lowercase (x)
  1285. "van gogh"
  1286. as-lowercase!
  1287.    string 
  1288. string
  1289. [G.F. Method]
  1290.     map-into(
  1291. string
  1292. , as-lowercase, 
  1293. string
  1294.  define variable x = "Van Gogh"
  1295.  as-lowercase! (x)
  1296. "van gogh"
  1297. as-uppercase
  1298.    string 
  1299. new-string
  1300. [G.F. M
  1301. ethod]
  1302. as-uppercase,
  1303. string
  1304.  define variable x = "Van Gogh"
  1305.  as-uppercase (x)
  1306. "VAN GOGH"
  1307. as-uppercase!
  1308.    string 
  1309. string
  1310. [G.F. Method]
  1311.     map-into(
  1312. string 
  1313. , as-uppercase
  1314. string
  1315.  define variable x = "Van Gogh"
  1316.  as-uppercase (x)
  1317. "VAN GOGH"
  1318. Courier
  1319. element
  1320. Palatino
  1321. unicode-string index
  1322.  #key 
  1323. default
  1324. Symbol
  1325.     character
  1326. [G. F. Method]
  1327. <unicode-string>
  1328. element
  1329. element-setter
  1330.     character
  1331. unicode-string index
  1332.     character
  1333. [G. F. Method]
  1334. <unicode-string>
  1335. element-setter
  1336. element
  1337. byte-string index
  1338.  #key 
  1339. default
  1340.     character
  1341.      
  1342.  [G. F. Method]
  1343. <byte-string>
  1344. element
  1345. element-set
  1346.     character
  1347. byte-string index
  1348.     character
  1349. [G. F. Method]
  1350. <byte-string>
  1351. element-setter
  1352. (Operations on Tables)
  1353. <table>
  1354. <table>
  1355. table-protocol
  1356. <table>
  1357. table-protocol
  1358. (The Table Protocol)
  1359. remove-key!
  1360. table key  
  1361. table
  1362. [Generic Function]
  1363. remove-key!
  1364. table
  1365.  test 
  1366. element-setter
  1367.    new-value table key 
  1368. [G. F. Method]
  1369. element-setter
  1370. (Operations on Vectors)
  1371. vector
  1372.   #rest
  1373.  args 
  1374. vector
  1375. [Function]
  1376. Courier
  1377. dimensions
  1378. Palatino
  1379. vector
  1380. Symbol
  1381. sequence
  1382. [G. F. Method]
  1383. element
  1384. simple-object-vector
  1385. index
  1386.  #key 
  1387. default
  1388. element
  1389. [G. F. Method]
  1390. <simple-object-vector>
  1391. element
  1392. element-setter
  1393. new-element
  1394. simple-object-vector
  1395. index
  1396. [G. F. Method]
  1397. new-element
  1398. <simple-object-vector>
  1399. element-setter
  1400. (The Iteration Protocol)
  1401. iteration 
  1402.     protocol)
  1403. state object)
  1404. mutable 
  1405. collection)
  1406. forward-iteration-protocol
  1407. collection
  1408. [Generic Function]
  1409. initial-state
  1410. :: <object>
  1411. limit
  1412. :: <object>
  1413. -state
  1414. :: <function>
  1415. finished-state?
  1416. :: <function>
  1417. current-key
  1418. :: <function>
  1419. current-element
  1420. :: <function>
  1421. current-element-setter
  1422. :: <function>
  1423. copy-state
  1424. :: <function>
  1425. collection
  1426. collection
  1427. collection
  1428. next-state
  1429. copy-state
  1430. Courier
  1431. initial-state
  1432. Palatino
  1433. state
  1434. limit
  1435. )$    finished-
  1436. state?
  1437. limit
  1438. initial-state
  1439. limit
  1440. finished-state? 
  1441. next-state 
  1442. collection state
  1443.     new-state
  1444. collection 
  1445. next-state
  1446. state
  1447. next-state
  1448. copy-
  1449. state
  1450. finished-state? 
  1451. collection state limit
  1452. boolean
  1453. next-state
  1454. current-element
  1455. current-key 
  1456. current-element-setter
  1457. current-key 
  1458. collection state
  1459. collection
  1460. state 
  1461. current-key
  1462. state
  1463. current-element 
  1464. collection state
  1465. element
  1466. state
  1467. collection
  1468. current-element-setter 
  1469. value
  1470. collection state
  1471. value
  1472. state
  1473. collection
  1474. value
  1475. value
  1476. <mutable-collection>
  1477. copy-state 
  1478. collection state
  1479.     new-state
  1480. collection
  1481. state 
  1482. backward-iteration-protocol
  1483. collection
  1484. [Generic Function]
  1485. Symbol
  1486. final-state
  1487. :: <object>
  1488. limit
  1489. :: <object>
  1490. Courier
  1491. previous-state
  1492. :: <function>
  1493. finished-state?
  1494. :: <function>
  1495. current-key
  1496. :: <function>
  1497. current-element
  1498. :: <function>
  1499. current-element-setter
  1500. :: <function>
  1501. copy-state
  1502. :: <function>
  1503.     backward-
  1504. iteration-protocol
  1505. final-
  1506. state
  1507. g    previous-
  1508. state
  1509. forward-iteration-
  1510. protocol
  1511. 06define method do1 (f :: <function>, c :: <collection>)
  1512. ,  let (init, limit, next, end?, key, elt) = 
  1513. 3                     forward-iteration-protocol(c);
  1514. (  for (state = init then next(c, state),
  1515.      until end?(c, state, limit))
  1516.     f(elt(c, state));
  1517.   end for;
  1518. end method do1;
  1519. Palatino
  1520. (The Table Protocol)
  1521. complex)
  1522. (equivalence predicate)
  1523. X, Y, Z 
  1524. (1) F(X,X) 
  1525. F(X,Y) 
  1526.  F(Y,X) 
  1527. (3) F(X,Y) 
  1528.  F(Y,Z) 
  1529.  F(X,Z)
  1530. (equivalence class)
  1531. (potential objects)
  1532. equivalence class
  1533. class"
  1534. define class
  1535. Dylan
  1536. (visibly modified)
  1537. Palatino
  1538. test function)
  1539. (hash function)
  1540. hash codes)
  1541. hash id)
  1542. hash state)
  1543.  Dylan
  1544.  Dylan
  1545. Courier
  1546. table-protocol
  1547. table
  1548. [Generic Function]
  1549. Symbol
  1550. test-function  hash-function
  1551. <table>
  1552. table-protocol
  1553. <table>
  1554. table-protocol
  1555. table-protocol
  1556. test-function
  1557.     key1 key2
  1558. boolean
  1559. test-function
  1560. hash-function
  1561. state
  1562. Courier
  1563. hash-function
  1564. Palatino
  1565. state
  1566. <table>
  1567. <table>
  1568. table-protocol
  1569. object-table
  1570. [G. F. Method]
  1571. Symbol
  1572. test-function  hash-function
  1573. <object-table>
  1574. test-function
  1575. hash-function
  1576. object-hash
  1577. 06define method table-protocol (table :: <object-table>)
  1578. B      => test-function :: <function>, hash-function :: <function>;
  1579.   values(\==, object-hash);
  1580. end method table-protocol;
  1581. merge-hash-codes
  1582. id1 state1 id2 state2  
  1583. ordered
  1584. [Function]
  1585. merged-id merged-state
  1586. merged-id 
  1587. state1
  1588. state2
  1589. merged-state 
  1590. ordered
  1591. ordered
  1592. $permanent-hash-state
  1593. [Constant]
  1594. object-hash
  1595. object
  1596. id state
  1597. [Function]
  1598. component)
  1599. object-hash
  1600. state
  1601. Palatino
  1602. &Iteration Stability and Natural Order)
  1603. (stable under iteration)
  1604.     unstable 
  1605. under iteration)
  1606. (Collection Keys)
  1607. Dylan
  1608. Courier
  1609. element
  1610. element
  1611. collection key 
  1612.  default
  1613. Symbol
  1614. element
  1615. [Generic Fun
  1616. ction]
  1617. element
  1618. collection
  1619. element
  1620. default
  1621. default
  1622. element
  1623. key-sequence
  1624. collection
  1625. [Generic Function]
  1626. key-sequence
  1627. collection
  1628. collection
  1629. collection 
  1630. key-sequence
  1631. collection
  1632. collection
  1633. Courier
  1634. <collection>
  1635. <collection>
  1636. <explicit-key-collection>
  1637. <sequence>
  1638. Palatino
  1639. <explicit-key-collection>
  1640. [Abstract Class]
  1641. <explicit-key-collection>
  1642. <sequence>
  1643. [Abstract Class]
  1644. <sequence>
  1645. <collection>
  1646. explicit-key-collection
  1647. <sequence>
  1648. <explicit-key-collection>
  1649. <explicit-key-collection>
  1650. forward-iteration-
  1651. protocol
  1652. current-key
  1653. <sequence>
  1654. -define method do-with-keys (f :: <function>, 
  1655. ;                            c :: <explicit-key-collection>)
  1656. ,  let (init, limit, next, end?, key, elt) = 
  1657. -               forward-iteration-protocol(c);
  1658. (  for (state = init then next(c, state),
  1659.      until end?(c, state, limit))
  1660. 0%     f(key(c, state), elt(c, state));
  1661.   end for;
  1662. end method do-with-keys;
  1663. =define method do-with-keys (f :: <function>, c :: <sequence>)
  1664. ,  let (init, limit, next, end?, key, elt) = 
  1665. .                forward-iteration-protocol(c);
  1666.   for (key :: <integer> from 0,
  1667. %    state = init then next(c, state),
  1668.      until end?(c, state, limit))
  1669.  f(key, elt(c, state));
  1670.   end for;
  1671. end method do-with-keys;
  1672. Mutability)
  1673. Courier
  1674. <mutable-collection>
  1675. <stretchy-collection>
  1676. Palatino
  1677. mixin classes)
  1678. <mutable-collection>
  1679. [Abstract Class]
  1680. <collection>
  1681. element-setter
  1682. <stretchy-collection>
  1683. [Abstract Class]
  1684. <collection>
  1685. element-setter
  1686. )        new-value
  1687. mutable-collection key 
  1688. [Generic Function]
  1689. Symbol
  1690.   new-value
  1691.     new-value
  1692. mutable-
  1693. collection 
  1694. collection
  1695. element-setter
  1696.     new-value
  1697. element-setter
  1698. <stretchy-collection>
  1699. element-setter
  1700. <explicit-key-collection>
  1701. <sequence>
  1702. size-
  1703. setter
  1704. key + 1
  1705. <mutable-collection>
  1706. <sequence>
  1707. <explicit-key-
  1708. colle
  1709. ction>
  1710. <mutable-sequence>
  1711. !<mutable-explicit-key-collection>
  1712. <mutable-sequence>
  1713. [Abstract Class]
  1714. <sequence>
  1715. <mutable-collection>
  1716. !<mutable-explicit-key-collection>
  1717. [Abstract Class]
  1718. <explicit-key-collection>
  1719. <mutable-collection>
  1720. Palatino
  1721. (Collection Alignment)
  1722. )$    (mapping)
  1723. multi-collection)
  1724. effectively)
  1725. Courier
  1726. element
  1727. element-setter
  1728. )x     key-test
  1729. key-test(c1) == key-test(c2)
  1730. 08define method do2 (f :: <function>, c1 :: <collection>, 
  1731. &                   c2 :: <collection>)
  1732. >  let keys = intersection(key-sequence(c1), key-sequence(c2));
  1733. )  let (init, limit, next, end?, key, elt)
  1734. #= forward-iteration-protocol(keys);
  1735. 0+  for (state = init then next(keys, state),
  1736. &       until end?(keys, state, limit))
  1737.     let key = elt(keys, state);
  1738.     f(c1[key], c2[key]);
  1739.   end for;
  1740. end method do2;
  1741. element
  1742. key-sequence
  1743. 0<define method do2 (f :: <function>, c1 :: <sequence>, c2 :: 
  1744. <sequence>)
  1745. /  let (init1, limit1, next1, end1?, key1, elt1)
  1746. != forward-iteration-protocol(c1);
  1747. 0/  let (init2, limit2, next2, end2?, key2, elt2)
  1748. != forward-iteration-protocol(c2);
  1749. 0-  for (state1 = init1 then next1(c1, state1),
  1750. Courier
  1751.         state2 = init2 then next2
  1752. (c2, state2),
  1753. 0*       until (end1?(c1, state1, limit1) | 
  1754. )              end2?(c2, state2, limit2)))
  1755. *    f(elt1(c1, state1), elt2(c2, state2));
  1756.   end for;
  1757. end method do2;
  1758. Palatino
  1759. map-into
  1760. 08define method map-into1 (target :: <mutable-collection>,
  1761. )                         f :: <function>,
  1762. 0                         source :: <collection>)
  1763. 0  let keys = intersection(key-sequence(target), 
  1764. 0                          key-sequence(source));
  1765. )  let (init, limit, next, end?, key, elt)
  1766. !forward-iteration-protocol(keys);
  1767. 0+  for (state = init then next(keys, state),
  1768. &       until end?(keys, state, limit))
  1769.     let key = elt(keys, state);
  1770. "    target[key] := f(source[key]);
  1771.   end for;
  1772. end method map-into1;
  1773. 6define method map-into1 (target :: <mutable-sequence>,
  1774.          f :: <function>,
  1775.          source :: <sequence>)
  1776. 07  let (init1, limit1, next1, end1?, key1, elt1, setter)
  1777. %= forward-iteration-protocol(target);
  1778. 0/  let (init2, limit2, next2, end2?, key2, elt2)
  1779. %= forward-iteration-protocol(source);
  1780. 01  for (state1 = init1 then next1(target, state1),
  1781. 1       state2 = init2 then next2(source, state2),
  1782. -       until (end1?(target, state1, limit1) |
  1783. -              end2?(source, state2, limit2)))
  1784. 3    setter(target, state1, f(elt2(source, state2)))
  1785.   end for;
  1786. end method map-into1;
  1787. ,(Defining a New Collection Class: A Summary)
  1788. forward-iteration-protocol
  1789. backward
  1790. element
  1791. key-test
  1792. <mutable-collection>
  1793. element-setter
  1794. Courier
  1795. <mutable-collection>
  1796. class-for-copy
  1797. <table>
  1798. table-protocol
  1799. Palatino
  1800. member?
  1801. reverse!
  1802. sort!
  1803. Palatino
  1804. (Characters and Symbols)
  1805. (Characters)
  1806. Courier
  1807. <character>
  1808. [Instantiable Class]
  1809. <character>
  1810. <object>
  1811. as-uppercase
  1812. )        character
  1813. Symbol
  1814.   uppercase-character
  1815. [G.F. Method]
  1816. as-uppercase
  1817. <character>
  1818. )l    character
  1819. )0    character
  1820. as-lowercase
  1821. )        character
  1822.   lowercase-character
  1823. [G.F. Method]
  1824. as-lowercase
  1825. <character>
  1826. )<    character
  1827. )0    character
  1828. )        <integer>
  1829.  character
  1830.       integer
  1831. [G.F. Method]
  1832. )l    character
  1833. <character>
  1834.  integer
  1835.   character
  1836. [G.F. Method]
  1837. integer
  1838. integer
  1839. )N    (Symbols)
  1840. <symbol>
  1841. as(<symbol>, 
  1842. string
  1843. as(<string>, 
  1844. symbol
  1845. Palatino
  1846. Courier
  1847.  example: == #"Example"
  1848. as(<string>, 
  1849. symbol
  1850. <symbol>
  1851. [Class]
  1852. <symbol>
  1853. <object>
  1854. <symbol>
  1855.  string
  1856. Symbol
  1857.   symbol
  1858. [G.F. Method]
  1859. string
  1860.  as (<symbol>, "foo")
  1861. #"foo"
  1862.  #"FOO" == as (<symbol>, "Foo")
  1863.  #"Foo"
  1864. #"foo"
  1865. )        <string> 
  1866. symbol
  1867.   string
  1868. [G.F. Method]
  1869.  as (<string>, #"Foo")
  1870. "Foo"
  1871. Palatino
  1872.     (Numbers)
  1873. Dylan
  1874.     Helvetica
  1875. <number>
  1876. l    <complex>
  1877. <real>
  1878. <rational>
  1879.     <integer>
  1880. <ratio>
  1881. <float>
  1882. <single-float>
  1883. <double-float>
  1884. <extended-float>
  1885. ABSTRACT
  1886. INSTANTIABLE
  1887. SEALED
  1888. NUMBER CLASSES
  1889. Courier
  1890. <single-float>
  1891. <double-float>
  1892. <extended-float>
  1893. (Automatic Type Conversion)
  1894. Dylan
  1895.  Common Lisp (X3J13)
  1896. rational canonicalization)
  1897. (coercions)
  1898. (Numeric Classes)
  1899. <number>
  1900. [Abstract Class]
  1901. <real>
  1902. [Sealed Class]
  1903. <float>
  1904. [Sealed Class]
  1905. <single-float>
  1906. [Sealed Class]
  1907. <double-float>
  1908. [Sealed Class]
  1909. <extended-float>
  1910. [Sealed Class]
  1911. <rational>
  1912. [Sealed Class]
  1913. Courier
  1914. <ratio>
  1915. Palatino
  1916. [Sealed Class]
  1917.     <integer>
  1918. [Sealed Class]
  1919.     <complex>
  1920. [Sealed Class]
  1921. (General Arithmetic Functions)
  1922. (Properties)
  1923.    integer
  1924. Symbol
  1925.       boolean
  1926. [Generic Function]
  1927. even?
  1928. integer
  1929.       boolean
  1930. [Generic Function]
  1931. zero?
  1932. )#       number
  1933.       boolean
  1934. [Generic Function]
  1935.     positive?
  1936.    real
  1937.       boolean
  1938. [Generic Function]
  1939.     negative?
  1940.    real
  1941.       boolean
  1942. [Generic Function]
  1943.     integral?
  1944. )?       number
  1945.       boolean
  1946. [Generic Function]
  1947. (Arithmetic Operations)
  1948. number1
  1949. number2
  1950.   number
  1951. [Generic Function]
  1952. number1
  1953. number2
  1954.   number
  1955. [Generic Function]
  1956. number1
  1957. number2
  1958.   number
  1959. [Generic Function]
  1960. number1
  1961. number2
  1962.   number
  1963. [Generic Function]
  1964. +, *, -, /
  1965. 0    5 + 6 * 4
  1966. \+, \*, \- 
  1967. 0.define class <my-number> (<number>) end class;
  1968. 5define method \+ (a :: <my-number>, b :: <my-number>)
  1969. $  my-personal-addition-method(a, b);
  1970. end method;
  1971. negative
  1972. number
  1973.   number
  1974. [Generic Function]
  1975. Courier
  1976. negative
  1977. floor
  1978. Palatino
  1979. Symbol
  1980.   integer real
  1981. [Generic Function]
  1982. ceiling
  1983.   integer real
  1984. [Generic Function]
  1985. round
  1986.   integer real
  1987. [Generic Function]
  1988. truncate
  1989.   integer real
  1990. [Generic Function]
  1991. Common Lisp (X3J13) 
  1992. floor/
  1993. real1 real2
  1994.   integer real
  1995. [Generic Function]
  1996. ceiling/
  1997. real1 real2 
  1998. integer real
  1999. [Generic Function]
  2000. round/
  2001. real1 real2 
  2002. nteger real
  2003. [Generic Function]
  2004. truncate
  2005. real1 real2
  2006. integer real
  2007. [Generic Function]
  2008. Common Lisp (X3J13)
  2009. floor
  2010. ceiling
  2011. round
  2012. truncate
  2013. modulo
  2014. real1 real2
  2015.   real
  2016. [Generic Function]
  2017. modulo
  2018.     floor/ ( 
  2019. real1
  2020. real2
  2021.     remainder
  2022. real1 real2
  2023.   real
  2024. [Generic Function]
  2025.     remainder
  2026. truncate/ ( 
  2027. real1
  2028. real2
  2029.     number1  
  2030. integer2
  2031.   number
  2032. [Generic Function]
  2033. number1
  2034. integer2
  2035. number
  2036.   number
  2037. [Generic Function]
  2038. logior
  2039. #rest
  2040. integers
  2041.       integer
  2042. [Generic Function]
  2043. logxor
  2044. #rest
  2045. integers
  2046.       integer
  2047. [Generic Function]
  2048. logand
  2049. #rest
  2050. integers
  2051.       integer
  2052. [Generic Function]
  2053. lognot
  2054. integer
  2055.       integer
  2056. [Generic Function]
  2057. logbit?
  2058. index integer
  2059.       boolean
  2060. [Generic Function]
  2061. integer count
  2062.       integer
  2063. [Generic Function]
  2064. logior
  2065. logxor
  2066. logand
  2067. lognot
  2068.  Common Lisp
  2069. logbit?
  2070.  Common Lisp
  2071. logbitp
  2072. Courier
  2073. rationalize
  2074. Palatino
  2075. number
  2076. Symbol
  2077.   number
  2078. [Generic Function]
  2079.     numerator
  2080. number
  2081.   number
  2082. [Generic Function]
  2083. denominator
  2084. number
  2085.   number
  2086. [Generic Function]
  2087. rationalize
  2088.     numerator
  2089. denominator
  2090. Revised
  2091.  Report on Scheme
  2092. integer1 integer2
  2093.       integer
  2094. [Generic Function]
  2095. integer1 integer2
  2096.       integer
  2097. [Generic Function]
  2098. integer1
  2099. integer2
  2100. real 
  2101. #rest
  2102.  more-reals
  2103.   real
  2104. [Function]
  2105. #rest
  2106. more-reals
  2107. [Function]
  2108. Palatino
  2109. (Other Operations)
  2110. (Functional Operations)
  2111.  Dylan
  2112. Courier
  2113. compose
  2114. function1 
  2115. #rest
  2116. more-functions
  2117. Symbol
  2118.   function
  2119. [Function]
  2120. compose
  2121. compose
  2122. compose
  2123. compose
  2124. /define method square (x :: <number>) x * x end;
  2125. square
  2126. 0define method square-all (coords :: <sequence>) 
  2127.       map (square, coords);
  2128.   end;
  2129. square-all
  2130. )define method sum (numbers :: <sequence>)
  2131.       reduce1 (\+, numbers);
  2132.   end;
  2133. 1define constant distance = compose(sqrt, sum, squ
  2134. b    are-all);
  2135. distance
  2136. distance ( #(3, 4, 5) );
  2137. 7.0710678118654755
  2138. complement
  2139. )        predicate
  2140.   function
  2141. [Function]
  2142. complement
  2143. predicate  
  2144. predicate  
  2145. complement
  2146. complement
  2147. complement (even?)
  2148. 1map (female?, list (michelle, arnold, roseanne));
  2149. #(#t, #f, #t)
  2150. >map (complement (female?), list (michelle, arnold, roseanne));
  2151. #(#f, #t, #f)
  2152. disjoin
  2153. predicate1
  2154. #rest
  2155. more-predicates
  2156.   function
  2157. [Function]
  2158. disjoin
  2159. disjunction)
  2160. Palatino
  2161. Courier
  2162. conjoin
  2163. predicate1 
  2164. #rest
  2165. more-predicates
  2166. Symbol
  2167.   function
  2168. [Function]
  2169. conjoin
  2170. conjunction)
  2171. curry
  2172. )        function 
  2173. #rest
  2174.  curried-args
  2175.   new-function
  2176. [Function]
  2177. curry
  2178. curried-args
  2179. function
  2180. curry (\=, "x")
  2181. curry (\+, 1)
  2182. curry (\>, 
  2183. curry (concatenate, 
  2184. "set-")
  2185. "set-"
  2186. ap (curry (\+, 1), #(3, 4, 5))
  2187. #(4, 5, 6)
  2188. rcurry
  2189.     function 
  2190. #rest
  2191. curried-args
  2192.   new-function
  2193. [Function]
  2194. rcurry
  2195.  (right curry
  2196.     function 
  2197. curry
  2198. rcurry (\>, 6)
  2199. : define constant yuppify = rcurry (concatenate, ", ayup");
  2200. yuppify
  2201. " yuppify ("I'm from New Hampsha");
  2202. "I'm from New Hampsha, ayup"
  2203. always
  2204. object
  2205.   function
  2206. [Function]
  2207. always
  2208. object 
  2209. always (1) ("x", "y", "z")
  2210.  always (#t) (#f, #f)
  2211. Palatino
  2212. (Function application)
  2213. Courier
  2214. apply
  2215. function
  2216. #rest
  2217. Symbol
  2218.   values
  2219. [Function]
  2220. apply
  2221. function
  2222. function
  2223.  apply(\+, #(1, 2))
  2224.  1 + 2
  2225.  define co
  2226. )<.nstant math-functions = list (\+, \*, \/, \-))
  2227.  math-functions
  2228. 04#({generic +}, {generic *}, {generic /}, {generic })
  2229.  first (math-functions)
  2230. {generic +}
  2231. ( apply (first (math-functions), #(1, 2))
  2232. Identity function)
  2233. identity
  2234. object
  2235.   object
  2236. [Function]
  2237. identity
  2238. object
  2239. Palatino
  2240. (Conditions)
  2241. Background)
  2242.  Common Lisp, C++, 
  2243.     PL/I, Ada
  2244. (informal)
  2245. overall structure)
  2246. (raise 
  2247.  throw
  2248.     (on-unit 
  2249.  catch
  2250. signalers)
  2251. Palatino
  2252.  Common Lisp
  2253. Common
  2254.  Lisp
  2255. unwound)
  2256. Common Lisp
  2257.     mmon Lisp
  2258. Common Lisp
  2259. ad hoc)
  2260. Common Lisp
  2261. Common Lisp
  2262. Palatino
  2263. Ada, 
  2264.  PL/I
  2265. Multics
  2266. Common 
  2267. Courier
  2268. unwind-protect
  2269. Dylan
  2270.  Common Lisp
  2271. Common Lisp
  2272. unwind-protect
  2273. Dylan
  2274. block
  2275. cleanup clause)
  2276. Common Lisp
  2277. Guy L.  Steele Jr 
  2278. Common 
  2279. Lisp: the Language
  2280. ANSI C++
  2281. Margaret A. Ellis
  2282. Bjarne Stroustrup 
  2283. "The Annotated C++ Reference Manual
  2284. Dylan
  2285. condition system)
  2286. (Overview)
  2287. Dylan
  2288. M(signal)
  2289. next-ha
  2290. ndler
  2291. (outside stack)
  2292. uCommon Lisp 
  2293. Palatino
  2294. signaling unit)
  2295. middle stack)
  2296. inside stack)
  2297. Courier
  2298. block
  2299.     exception
  2300. restarting)
  2301. signal
  2302. signal
  2303. signal
  2304. component)
  2305. handling by returning)
  2306. {    recovery 
  2307.     protocol)
  2308. (handling by termina
  2309. ting)
  2310. Palatino
  2311. Courier
  2312. <unbound-slot>
  2313. <new-value>
  2314. <new-value>
  2315. value:
  2316. permanent:
  2317. Introspective functions)
  2318. serious 
  2319. condition)
  2320. (intervene)
  2321. (Specification)
  2322. Dylan
  2323. (Format Strings)
  2324. format 
  2325. directives)
  2326. Courier
  2327. Palatino
  2328. )H    <integer>
  2329. )T    <integer>
  2330. )T    <integer>
  2331. )T    <integer>
  2332. <character>
  2333. <string>
  2334. <condition>
  2335. <object>
  2336. Common Lisp
  2337. format
  2338. printf
  2339. streams library)
  2340. <simple-error>,
  2341. mple-restart>
  2342. <simple-warning>
  2343. )-    (Classes)
  2344.  Dylan
  2345.  Dylan
  2346. <condition>
  2347. <condition>
  2348. <serious-condition>
  2349. <error>
  2350. <simple-error>
  2351. <type-error>
  2352. <simple-warning>
  2353. <simple-restart>
  2354. <abort>
  2355. ABSTRACT
  2356. INSTANTIABLE
  2357. CONDITION CLASSES
  2358. +*3    <warning>
  2359. )l    <restart>
  2360. Courier
  2361. <condition>
  2362. Palatino
  2363. [Abstract Class]
  2364. <condition>
  2365. indefinite extent)
  2366. <condition>
  2367. <serious-condition>
  2368. [Abstract Class]
  2369. <serious-condition>
  2370. <serious-condition>
  2371. <error>
  2372. [Abstract Class]
  2373. <error>
  2374. <error>
  2375.     <serious-
  2376. condition>
  2377. <error>
  2378. <serious-condition>
  2379. trap)
  2380. <simple-error>
  2381. [Instantiable Class]
  2382. <simple-error>
  2383. <error>
  2384. format-
  2385. string: 
  2386. format-arguments:
  2387. condition-
  2388. format-string
  2389. condition-format-arguments
  2390. <type-error>
  2391. [Instantiable Class]
  2392. <type-error>
  2393. check-type
  2394. <error>
  2395. value:
  2396. type:
  2397. type-error-value
  2398. type-error-expected-type
  2399. Courier
  2400. <sealed-object-error>
  2401. Palatino
  2402. [Instantiable Class]
  2403. <sealed-object-error>
  2404. <error>
  2405.     <warning>
  2406. [AbstractClass]
  2407.     <warning>
  2408. <condition>
  2409.     <warning>
  2410. <simple-warning>
  2411. [Instantiable Class]
  2412. <simple-warning>
  2413. signal
  2414. )H    <warning>
  2415.     <warning>
  2416. <simple-error>
  2417.     <restart>
  2418. [Abstract Class]
  2419. )<    <restart>
  2420.     <restart>
  2421. <condition>
  2422.     <restart>
  2423. ,    <restart>
  2424. condition:
  2425. <simple-restart>
  2426. [Instantiable Class]
  2427. <simple-restart>
  2428. cerror
  2429. )<    <restart>
  2430. format-string:
  2431. format-arguments:
  2432. condition-format-string
  2433. condition-format-arguments
  2434. <abort>
  2435. [Instantiable Class]
  2436. <abort>
  2437.     <restart>
  2438. <abort>
  2439. (Basic Operator for Signaling)
  2440. signal
  2441. )        condition
  2442. Symbol
  2443.   values
  2444. [Function]
  2445. Palatino
  2446.     condition
  2447. Courier
  2448. signal
  2449. default-handler(
  2450. )p    condition
  2451. signal
  2452. condition 
  2453. signal
  2454. signal
  2455.     condition
  2456. signal
  2457. ((Basic Operator for Handling Conditions)
  2458. let handler
  2459.     condition
  2460. handler
  2461. [Local Declaration]
  2462. let handler
  2463. dynamic 
  2464. extent)
  2465.     condition
  2466. test: 
  2467.  ] [, 
  2468. init-arguments:  
  2469. init-arguments
  2470. handler
  2471. init-arguments
  2472. let handler
  2473. type 
  2474. <set-
  2475. and-continue>
  2476. <unbound-slot>
  2477. handler
  2478. next 
  2479. handler
  2480. signal
  2481. next-handler
  2482. Palatino
  2483. init-arguments
  2484. type 
  2485. handler
  2486. condition wall)
  2487. handler 
  2488. Courier
  2489. let handler
  2490. let handler
  2491. (Miscellaneous Condit
  2492. ion Operations)
  2493. $Full Set of Operators for Signaling)
  2494. primitives)
  2495. signal
  2496. )        condition
  2497. Symbol
  2498.   values
  2499. [Function]
  2500. signal
  2501. string argument
  2502.      argument
  2503. values
  2504.     condition
  2505. signal
  2506. default-handler(
  2507. )p    condition
  2508. signal
  2509. condition 
  2510. signal
  2511. signal
  2512. )$    condition
  2513. signal
  2514. Courier
  2515. <simple-warning>
  2516. error
  2517. Palatino
  2518.    condition
  2519. Symbol
  2520. [Function]
  2521. error
  2522.  string argument
  2523.      argument
  2524. error
  2525. signal
  2526. error
  2527. bombs)
  2528. error
  2529. <simple-error>
  2530. cerror
  2531. restart-description condition
  2532. [Function]
  2533. cerror
  2534. )    #restart-description string argument
  2535.      argument
  2536. cerror
  2537. error
  2538. init-arguments:
  2539. format-
  2540. string:
  2541. restart-description
  2542. format-arguments: 
  2543. argument
  2544. argument
  2545. , ... 
  2546. <simple-re
  2547. start>
  2548. cerror
  2549. cerror
  2550. cerror
  2551. cerror
  2552. break
  2553.     condition
  2554. [Function]
  2555. break
  2556. string argument
  2557.      argument
  2558. break
  2559. signal
  2560. break
  2561. <simple-restart>
  2562. break
  2563. check-type
  2564.    value type
  2565.   value
  2566. [Function]
  2567. instance?(
  2568. value , type
  2569. check-type
  2570. <type-error>
  2571. abort
  2572. [Function]
  2573. error(make (<abort>))
  2574. abort
  2575. signal
  2576. error
  2577. Palatino
  2578. #(Additional Operators for Handling)
  2579. Dylan
  2580. Courier
  2581. block
  2582. )?    exception
  2583. block
  2584. body 
  2585. cleanup-clauses
  2586. block
  2587. exception-clauses
  2588. exception ( 
  2589.   |  
  2590.   #key 
  2591. test init-arguments
  2592. exception-body
  2593. exception-body
  2594. exception-body
  2595. exception-body 
  2596. block
  2597. cleanup-clauses 
  2598. exception-body
  2599. init-arguments 
  2600. let handler
  2601. block
  2602. body 
  2603. block (return)
  2604.   open-files();
  2605.   ...
  2606.   result
  2607. exception (<error>) 
  2608.   return(#f);
  2609. cleanup
  2610.   close-files();
  2611.     end block
  2612. default-handler
  2613. )        condition
  2614. Symbol
  2615.   values
  2616. [Generic Function]
  2617. default-handler
  2618. <condition>
  2619. <serious-condition>
  2620.     <warning>
  2621. )0    <restart>
  2622. #Operators for Interactive Handling)
  2623. restart-query
  2624. [Generic Function]
  2625. restart-query
  2626. restart
  2627. Palatino
  2628. making a restart)
  2629. Courier
  2630. restart-query
  2631.     <restart>
  2632. return-query
  2633. )        condition
  2634. [Generic Function]
  2635.     condition
  2636. return-allowed?
  2637. return-query
  2638. return-query
  2639. Operators for Introspection)
  2640. do-handlers
  2641. funarg
  2642. [Function]
  2643. do-handlers
  2644. funarg 
  2645. funarg
  2646. function
  2647. init-arguments
  2648. init-arguments
  2649. return-allowed?
  2650. )        condition
  2651. Symbol
  2652.       boolean
  2653. [Generic Function]
  2654. )H    condition
  2655. <condition>
  2656. return-allowed?
  2657. return-description
  2658. )        condition
  2659.   description
  2660. [Generic Function]
  2661. return-
  2662. description
  2663. description)
  2664. description
  2665. return-allowed?
  2666. return-description
  2667. return-description
  2668. Palatino
  2669.     (Modules)
  2670. `    segments)
  2671. (Module variables)
  2672. Dylan
  2673. (Overview)
  2674. owned)
  2675. using)
  2676. import)
  2677. export)
  2678. accessible)
  2679. Courier
  2680. define module
  2681. create
  2682. Dylan
  2683. define constant
  2684. define 
  2685. variable
  2686. define generic
  2687. define class
  2688. define method
  2689. define class
  2690. object-class
  2691. Palatino
  2692. /Programs, module declarations, and expressions)
  2693. Dylan
  2694. Courier
  2695. begin
  2696. define module
  2697. (Module declarations)
  2698. define module
  2699. define module
  2700. module-name
  2701. [Definition]
  2702. module-clauses
  2703. end [ module ] [ 
  2704. module-name
  2705.  module-clause
  2706. (use clause)
  2707. create clause)
  2708. Palatino
  2709. export clause)
  2710. module-name
  2711. module-name 
  2712. (Used modules)
  2713. use-clause
  2714. use-clause
  2715. Courier
  2716. module-name
  2717. module-use-options
  2718. module-name
  2719. module-use-options
  2720. module-use-option
  2721. import-option
  2722. import: all
  2723. import: 
  2724. import-set
  2725. import-set 
  2726. imports
  2727. imports 
  2728. import
  2729. import 
  2730. imports
  2731. Courier
  2732. import 
  2733. variable-name
  2734. variable-name
  2735. variable-name
  2736. Palatino
  2737. import-option
  2738. import: {foo 
  2739. => bar} 
  2740. #import: {foo}, rename: {foo => bar}
  2741. exclude-option
  2742. exclude:
  2743. variable-name-set
  2744. variable-name-set
  2745. variable-names
  2746. variable-names
  2747. variable-name
  2748. variable-name
  2749. variable-names
  2750. import:
  2751. exclude:
  2752. prefix-option
  2753. prefix:
  2754.  string
  2755. string
  2756. rename:
  2757. prefix:
  2758. rename-option
  2759. $    rename: {
  2760. rename-specs
  2761. rename-specs
  2762. rename-spec
  2763. rename-spec
  2764. rename-specs
  2765. rename-spec
  2766. $    old-name 
  2767.     new-name 
  2768. import:
  2769. exclude:
  2770. prefix:
  2771. import:
  2772. export:
  2773. D    old-name 
  2774.     new-name 
  2775. prefix:
  2776. rename
  2777. rename:
  2778. Courier
  2779. export-option
  2780. export: all
  2781. export:
  2782. variable-name-set
  2783. Palatino
  2784. variable-name
  2785. variable-name
  2786. export:
  2787. Exporting owned variables)
  2788. (module export clause)
  2789. export
  2790. variable-names
  2791. variable-name 
  2792. module create clause)
  2793. create
  2794. variable-names
  2795. variable-name 
  2796. Examples
  2797. define module graphics
  2798.   use dylan;
  2799.   create draw-line,
  2800.          erase-line,
  2801.          invert-line,
  2802.          skew-line
  2803.          frame-rect,
  2804.          fill-rect,
  2805. Courier
  2806.              
  2807. erase-rect,
  2808.          invert-rect;
  2809. end module graphics;
  2810. define module lines
  2811.   use dylan;
  2812.   use graphics,
  2813. import: {draw-line,
  2814.                erase-line,
  2815.                invert-line,
  2816.                skew-line};
  2817. end module lines;
  2818. define module rectangles
  2819.   use dylan;
  2820.   use graphics,
  2821. prefix: "graphics$",
  2822. exclude: {skew-line};
  2823. end module rectangles;
  2824. define module dylan-gx
  2825.   use dylan, export: all;
  2826.   use graphics,
  2827. !rename: {skew-line => warp-line},
  2828.       export: all;
  2829. end module dylan-gx;
  2830. graphics
  2831. )H    draw-line
  2832. erase-line
  2833. invert-line
  2834.     skew-line
  2835. frame-rect
  2836.     fill-rect
  2837. erase-rect
  2838. invert-rect
  2839. Dylan
  2840. Palatino
  2841. )#     module  
  2842. lines
  2843. )H    draw-line
  2844. erase-line
  2845. invert-line
  2846.     skew-line
  2847. Dylan
  2848. )#     module  
  2849. rectangles
  2850. graphics$draw-line
  2851. graphics$erase-line
  2852. graphics$invert-line
  2853. graphics$frame-rect
  2854. graphics$fill-rect
  2855. graphics$erase-rect
  2856. Courier
  2857. graphics$invert-rect
  2858. Dylan
  2859. Palatino
  2860. )#     module  
  2861. dylan-gx
  2862. )H    draw-line
  2863. erase-line
  2864. invert-line
  2865.     warp-line
  2866. frame-rect
  2867.     fill-rect
  2868. erase-rect
  2869. invert-rect
  2870. Dylan
  2871. )#     module  
  2872. lines
  2873. rectangles
  2874. graphics
  2875. graphics
  2876. dylan-gx
  2877. dylan-gx
  2878. dylan
  2879. graphics
  2880. Palatino
  2881. (Libraries)
  2882. Dylan
  2883. Courier
  2884. module
  2885. library
  2886. library-export-clause
  2887. library-export-clause
  2888. module-name
  2889. library-use-option
  2890. export: all 
  2891. export-option
  2892. Palatino
  2893. library-use-clause
  2894. use-clau
  2895. use-clause
  2896. use-clause 
  2897. use-clauses 
  2898. library-use-clause
  2899. module-use-clause 
  2900. library-use-clause
  2901. library-name
  2902. Courier
  2903. dylan
  2904. dylan
  2905.  Dylan
  2906. Dylan
  2907. dylan
  2908. begin
  2909. define library
  2910. dylan-user
  2911. Palatino
  2912. Dylan
  2913. B9%+GE<
  2914.     @R@7
  2915.  `/ 9
  2916. 2F945
  2917. p 0p`P
  2918. 6:@75*
  2919. "A>/+
  2920.  F 9@
  2921.     8$0*
  2922. %X`PD@
  2923. 8 (00
  2924. 8 8 0
  2925. %+&*)1:
  2926. 9><CA
  2927. 2!#6G=H
  2928.   PP0P 
  2929. r`gPA
  2930. '$`C6
  2931. `N \P@
  2932. ?a q 
  2933. B9%+GE<
  2934. 2F945
  2935. 6:@75*
  2936. "A>/+
  2937. %+&*)1:
  2938. 9><CA
  2939. 2!#6G=H
  2940. Macintosh
  2941. 32-bit
  2942.     temp.0001
  2943. BKMacRecorder
  2944. BfMacintosh IIfx 
  2945. mutsumi
  2946. Mutchan
  2947. EOFST
  2948. ffffff
  2949. ffff33
  2950. ff33ff
  2951. ff3333
  2952. 33ffff
  2953. 33ff33
  2954. 3333ff
  2955. 333333
  2956. wwwwww
  2957. UUUUUU
  2958. DDDDDD
  2959. """"""
  2960. Palatino
  2961.     Helvetica
  2962. Courier
  2963. Symbol9
  2964.     l/bpl/bp
  2965.     l/bpl/bp
  2966. l/bpl/bp
  2967.     l/bpl/bp
  2968. jPREC
  2969. vPRVS
  2970. |    Chap.8-15
  2971. CGDCCGVM
  2972. CGDCCGVM
  2973.